var mongooes = require('mongoose')

var classSchame = new mongooes.Schema({
  cId: Number,
  className: String,
  docutor: String
})

classSchame.set('autoIndex', true);
var Classes = mongooes.model('AllClass',classSchame)


var  addClass = function(obj){
  console.log(JSON.stringify(obj))
  
  var classIns = new Classes(obj)
  classIns.save(function(err){
    if(err){
      console.log(err)
    }
  })
}

exports.addClass = addClass
